import requests
def zi_yin_token(username,password):
    '''
    :param username: 用户名
    :param password: 密码
    :return: 自营平台token
    '''
    headers1={'accept':'application/json, text/plain, */*'}
    response=requests.post('https://xx/yudian_authz/oauth/token?username={}&password={}&client_id'
                       '=xx'.format(username,password),headers1)
    return response.json()["access_token"]



